/*!
 Temelia - Pair interface.

 Copyright (C) 2008, 2009 Ceata (http://ceata.org/proiecte/temelia).

 @author Dascalu Laurentiu

 This program is free software; you can redistribute it and
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 3
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef PAIR_H_
#define PAIR_H_

#include "platform.h"

struct _pair_t;
typedef struct _pair_t *pair_t;

/*!
 * @brief Constructor - returns a pair containing key and value.
 * Complexity O(1)
 *
 * @param Key
 * @param Value
 */
DECLSPEC pair_t pair_new(void *key, void *value);

/*!
 * @brief Destructor - frees the memory occupied by pair.
 * Complexity O(1)
 *
 * @param Pair
 */
DECLSPEC void pair_delete(pair_t pair);

/*!
 * @brief Sets key of pair.
 * Complexity O(1)
 *
 * @param Pair
 * @param Key
 */
DECLSPEC void pair_set_key(pair_t pair, void *key);

/*!
 * @brief Sets value of pair.
 * Complexity O(1)
 *
 * @param Pair
 * @param Value
 */
DECLSPEC void pair_set_value(pair_t pair, void *value);

/*!
 * @brief Returns key of pair.
 * Complexity O(1)
 *
 * @param Pair
 */
DECLSPEC void *pair_get_key(pair_t pair);

/*!
 * @brief Returns value of pair.
 * Complexity O(1)
 *
 * @param Pair
 */
DECLSPEC void *pair_get_value(pair_t pair);

#endif /*! PAIR_H_ */
